Initialize the colormap to zero. (#171762, David Costanzo)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 7 Apr 2005 05:44:41 +0000 (05:44 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 7 Apr 2005 05:44:41 +0000 (05:44 +0000)
2005-04-07  Matthias Clasen  <mclasen@redhat.com>

* io-bmp.c (DecodeColormap): Initialize the colormap to
zero.  (#171762, David Costanzo)

gdk-pixbuf/io-bmp.c

index 4cdcc112c34db3a9298ba11379933707b0044262..c754431fcf8c56afe4602ca17b13c1e929f0c0d3 100644 (file)
@@ -462,7 +462,7 @@ static gboolean DecodeColormap (guchar *buff,
                return TRUE;
        }
 
-       State->Colormap = g_malloc ((1 << State->Header.depth) * sizeof (*State->Colormap));
+       State->Colormap = g_malloc0 ((1 << State->Header.depth) * sizeof (*State->Colormap));
        for (i = 0; i < State->Header.n_colors; i++)
 
        {